﻿using System;
using System.Linq;


class PrintCharsNumber
{
    static void Main()
    {
        char[] alphabet = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };
        string word = Console.ReadLine();
        char[] wordLetters = word.ToCharArray();

        foreach (var letter in wordLetters)
        {
            Console.Write("{0}\t", Array.BinarySearch(alphabet, letter));
            
        }

        Console.WriteLine();

        foreach (var letter in wordLetters)
        {
            Console.Write("{0}\t", letter);

        }
        Console.WriteLine();

    }
}

